<%@ page language="java" import="java.util.*,com.bgt.*"
	pageEncoding="UTF-8"%>
<%@ include file="/page/comm/comm.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div id="p2" class="easyui-panel" title="My Panel"
		style="width: 500px; height: 150px; padding: 10px; background: #fafafa;"
		data-options="iconCls:'icon-save',closable:true">
		<%--,collapsible:true,minimizable:true,maximizable:true  祛除折叠 最小最大化--%>
		 <div id="adduser" title="添加用户" style="width:400px;height:200px;">
		 	<form id="addusers">
			 <table>
			 	<tr>
			 	<td>用户名：</td>
			 	<td><input type="text" name="usertem.userName" /></td>
			 	</tr>
			 	<tr>
			 	<td>密码：</td>
			 	<td><input type="password" name="usertem.passWord" /></td>
			 	</tr>
			 	<tr>
			 		<td>
			 		<input type="button" value="登录" onclick="add()"/>
			 		</td>
			 	</tr>
			 </table>
			 </form>
			 </div>

	</div>
<script type="text/javascript">
	function openpanel(obj) {
		if (obj == 1) {
			$("#p").panel({
				closed : false
			});
		} else {
			$("#p").panel({
				closed : true
			});
		}
	}
	function add(){
		$.ajax({
			url:"mUserAction!addUser.do",
			data:$("#addusers").serialize(),
			type:"post",
			dataType: 'json',
			success:function(data){
				console.info(data);
				if(data.dataMap.success){
					$.messager.alert("提示",data.dataMap.msg);
				}else{
					$.messager.alert("提示",data.dataMap.msg);
				}
			}
		});
	}
</script>
</body>
</html>